<%@ page contentType="text/html;charset=UTF-8" language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/include/jstl.jsp" %>
<html>    
<body>
    <form id="pagerForm" method="post" action="540101.tran">    
        <input type="hidden" name="pageNum"     value="${ETF.PAGENUM}"  />
        <input type="hidden" name="RULE_CODE"   value="${ETF.RULE_CODE}"/>
        <input type="hidden" name="RULE_NAME"   value="${ETF.RULE_NAME}"/>
        <input type="hidden" name="IS_USE"      value="${ETF.IS_USE}"   />
        <input type="hidden" name="RULE_TYPE"   value="${ETF.RULE_TYPE}"/>
        <input type="hidden" name="IS_ONLINE"   value="${ETF.IS_ONLINE}"/>
    </form>
    <div class="pageHeader">
        <div class="searchBar">
            <form onsubmit="return navTabSearch(this)" id="findUsrRule" name="findUsrRule" action="540101.tran" method="post">
                <table class="searchContent">
                    <tr>
                        <td>规则编号:</td>
                        <td align="left" style="width:139px">
                            <input type="text" id="RULE_CODE" name="RULE_CODE" value="${ETF.RULE_CODE}" size="20" maxlength="14"/>
                        </td>
                        <td>规则名称:</td>
                        <td align="left" style="width:139px">
                            <input type="text" id="RULE_NAME" name="RULE_NAME" value="${ETF.RULE_NAME}" size="20" maxlength="30"/>
                        </td>
                        <td>生效标志:</td>
                        <td>
                            <select name="IS_USE" id="IS_USE" >
                                <option value="" selected="selected">--请选择--</option>
                                <option value="0" <c:if test="${ETF.IS_USE=='0'}">selected="selected"</c:if>>禁用</option>
                                <option value="1" <c:if test="${ETF.IS_USE=='1'}">selected="selected"</c:if>>启用</option>
                            </select>
                        </td>
                        <td>规则类型</td>
                        <td>
                            <select name="RULE_TYPE" id="RULE_TYPE" >
                                <option value="" selected="selected">--请选择--</option>
                                <option value="0" <c:if test="${ETF.RULE_TYPE=='0'}">selected="selected"</c:if>>用户</option>
                                <option value="1" <c:if test="${ETF.RULE_TYPE=='1'}">selected="selected"</c:if>>商户</option>
                            </select>
                        </td>
                        
                    </tr>
                </table>
                <div class="subBar">
                    <ul>
                        <!--<li><a class="button" href="540120.tran"  title="添加规则" target="navTab"  rel="userLimit3"><span>添加规则</span></a></li>-->
                        <li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>                                                 
                    </ul>
                </div>
            </form>
        </div>
    </div>
    <div class="pageContent">
        <div class="panelBar"></div>
            <table class="table" width="100%" layoutH="139">
                <thead>
                    <tr>
                        <th width="60">规则编号</th>
                        <th width="100">规则名称</th>
                        <th width="30">规则类型</th>
                        <th width="30">一般预警项</th>
                        <th width="30">生效标志</th>
                        <th width="160">规则描述</th>
                        <th width="50">操 &nbsp;作</th>                            
                    </tr>
                </thead>
                <tbody>
                    <c:choose>
                        <c:when test="${ETF.RSPCOD=='000000'}">
                            <c:forEach items="${ETF.REC}" var="GRP">    
                                <tr target="sid_user" rel="1">
                                    <td width="8%">${GRP.RULE_CODE}</td>
                                    <td>${GRP.RULE_NAME}</td>
                                    <td width="8%"> 
                                        <c:if test="${GRP.RULE_TYPE ==0}">用户</c:if>
                                        <c:if test="${GRP.RULE_TYPE ==1}">商户</c:if>    
                                    </td><!--规则类型 0:用户 1:商户-->
                                    <td width="8%">
                                        <c:if test="${GRP.RULE_LEVEL_ITEM==0}">交易突增</c:if>
                                        <c:if test="${GRP.RULE_LEVEL_ITEM==1}">疑似套现</c:if>    
                                        <c:if test="${GRP.RULE_LEVEL_ITEM==2}">分单</c:if>    
                                        <c:if test="${GRP.RULE_LEVEL_ITEM==3}">非常规时段交易</c:if>    
                                        <c:if test="${GRP.RULE_LEVEL_ITEM==4}">零交易</c:if>    
                                        <c:if test="${GRP.RULE_LEVEL_ITEM==5}">其它</c:if>    
                                    </td><!--一般预警项 0：交易突增 1：疑似套现 2：分单 3：非常规时段交易 4：零交易 5：其它 6：预警紧急或线上无一般预警项-->
                                    <td width="8%">
                                        <c:if test="${GRP.IS_USE==1}">启用</c:if>    
                                        <c:if test="${GRP.IS_USE==0}"><div style="color:dimgray" >禁用</div></c:if>    
                                        <c:if test="${GRP.IS_USE==null}"><div style="color:dimgray" >禁用</div></c:if>    
                                    </td>
                                    <td>${GRP.RULE_DES}</td>
                                    <td width="10%">
                                        <a title="查看" target="navTab" href="540102.tran?RULE_CODE=${GRP.RULE_CODE}"  ><span style="color:#15428b;">详 情</span></a>
                                        | <a title="编辑" rel="finduserrule" target="navTab" href="540103.tran?RULE_CODE=${GRP.RULE_CODE}"  ><span style="color:#15428b;">编 辑</span></a>
                                        
                                    </td>
                                </tr>
                            </c:forEach>
                        </c:when>
                        <c:otherwise>
                            <tr>
                                <td>没有符合条件的记录</td>
                            </tr>
                        </c:otherwise>
                    </c:choose>
                </tbody>
            </table>
            <div class="panelBar">
                <div class="pages">
                    <span>共[${ETF.TOLCNT}]条,每页显示${ETF.NUMPERPAGE}条，当前第
                    <c:choose>
                        <c:when test="${ETF.TOLCNT==0}"> 0 </c:when>
                        <c:when test="${ETF.TOLCNT>0&&ETF.TOLCNT<=ETF.NUMPERPAGE}">1-${ETF.TOLCNT}</c:when>             
                        <c:otherwise>
                            <c:choose>
                               <c:when test="${(ETF.PAGENUM-1)*ETF.NUMPERPAGE+1>ETF.TOLCNT}">${ETF.STARTINDEX}</c:when>  
                               <c:otherwise>${(ETF.PAGENUM-1)*ETF.NUMPERPAGE+1}</c:otherwise>
                            </c:choose>
                            -
                            <c:choose>
                                <c:when test="${ETF.PAGENUM*ETF.NUMPERPAGE>=ETF.TOLCNT}">${ETF.TOLCNT}</c:when>           
                                <c:otherwise>${ETF.PAGENUM*ETF.NUMPERPAGE}</c:otherwise>
                            </c:choose>
                        </c:otherwise>
                    </c:choose>
                    条</span>
                </div>
                <div class="pagination" targetType="navTab" totalCount="${ETF.TOLCNT}" numPerPage="${ETF.NUMPERPAGE}" pageNumShown="${ETF.PAGENUMSHOWN}" currentPage="${ETF.PAGENUM}"></div>
            </div>
</body>
</html>
